<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>登录页</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background: url(img/bg.jpeg);
        }

        .bigbox {
            width: 400px;
            height: 400px;
            border: 1px solid red;
            margin: 0 auto;
            margin-top: 200px;
            border-radius: 10px;
        }

        header {
            width: 400px;
            height: 75px;
            background-color: #87cefa;
            text-align: center;
            line-height: 80px;
            font-size: 24px;
            font-family: 700;
            color: #fff;
            border-radius: 7px 7px 0 0;
        }

        .bigbox input {
            width: 300px;
            height: 40px;
            margin-top: 50px;
            margin-left: 50px;
            border-radius: 5px;
            outline: none;
            padding-left: 10px;
        }

        .bigbox .line {
            display: flex;
            justify-content: space-between;
            margin-bottom: 20px;
        }

        button {
            width: 70px;
            height: 40px;
            margin-top: 20px;
            margin-left: 175px;
            font-size: 20px;
            background-color: #90ee90;
            border-radius: 5px;
        }
    </style>
</head>

<body>
    <div class="bigbox">
        <header>
            欢迎登陆后台管理系统
        </header>
        <input type="text" placeholder="输入用户名">
        <input type="text" placeholder="输入密码">
        <div class="line">
            <a href="./zhuce.html">去注册</a>
            <a>忘记密码</a>
        </div>
        <button><a href="./表格案例.html">登录</a></button>
    </div>
</body>

</html>
<script src="/static/axios.min.js"></script>
<script>
    
//获取输入框
var inputs = document.querySelectorAll('input');
//获取登陆按钮
var loginBtn = document.querySelector('button');

//给登录按钮 绑定点击事件
loginBtn.onclick = ()=>{
    //发起登陆请求
    axios.post('/user/login', { phone:inputs[0].value, pass:inputs[1].value} ).then((res)=>{
        console.log(res.data);
    })
}
</script>